/* 发现页面专用样式 */

/* 通用样式 */
.section-header, .module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 15px;
}

.section-header h2, .module-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.more-link, .more {
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.more-link:hover, .more:hover {
    color: #1890ff;
}

.more-link i, .more i {
    margin-left: 4px;
    font-size: 12px;
}

/* 轮播图区域 */
.banner-slider {
    position: relative;
    overflow: hidden;
    margin-bottom: 25px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 180px;
}

.slider-container {
    position: relative;
    height: 100%;
    width: 100%;
}

.slider-item {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.slider-item.active {
    opacity: 1;
    z-index: 1;
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-caption {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    z-index: 2;
}

.slider-caption h3 {
    font-size: 18px;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.slider-caption p {
    font-size: 14px;
    margin: 0;
    opacity: 0.9;
}

.btn-more {
    display: inline-block;
    padding: 6px 15px;
    background-color: #1890ff;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.btn-more:hover {
    background-color: #0c7ad9;
    color: white;
}

.slider-indicators {
    position: absolute;
    bottom: 15px;
    right: 20px;
    display: flex;
    gap: 8px;
    z-index: 3;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.indicator.active {
    background-color: #fff;
    width: 20px;
    border-radius: 4px;
}

/* 快捷入口 */
.quick-access {
    display: flex;
    justify-content: space-between;
    margin: 20px 15px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.quick-access::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.access-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 70px;
}

.access-item:hover {
    background-color: #f0f2f5;
}

.access-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1890ff;
    color: white;
    border-radius: 50%;
    margin-bottom: 8px;
    font-size: 18px;
}

.access-icon i {
    font-size: 20px;
}

.access-item span {
    font-size: 12px;
    color: #333;
    text-align: center;
}

/* 模块通用样式 */
.module {
    margin-bottom: 25px;
}

/* 文章列表 */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
}

.article-item {
    display: flex;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.article-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-img {
    flex: 0 0 120px;
    height: 100px;
}

.article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-content {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.article-content h3 {
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    font-size: 12px;
    color: #999;
}

.author {
    display: flex;
    align-items: center;
}

.author-avatar {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 5px;
    object-fit: cover;
}

.article-desc {
    font-size: 13px;
    color: #666;
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.views {
    display: flex;
    align-items: center;
}

.views i {
    margin-right: 4px;
}

/* 职业测评 */
.assessment-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
}

.assessment-card {
    display: flex;
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.assessment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.assessment-icon {
    flex: 0 0 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1890ff;
    color: white;
    border-radius: 12px;
    margin-right: 15px;
}

.assessment-icon i {
    font-size: 24px;
}

.assessment-info {
    flex: 1;
}

.assessment-info h3 {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 5px 0;
}

.assessment-info p {
    font-size: 13px;
    color: #666;
    margin: 0 0 10px 0;
}

.assessment-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
    margin-bottom: 12px;
}

.start-btn {
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.start-btn:hover {
    background-color: #0c7ad9;
}

/* 校园活动 */
.event-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
}

.event-item {
    display: flex;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.event-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.event-date {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f5f5f5;
    padding: 10px;
    min-width: 70px;
}

.month {
    font-size: 12px;
    color: #666;
}

.day {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.event-info {
    flex: 1;
    padding: 12px;
}

.event-info h3 {
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.event-location {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.event-location i {
    margin-right: 5px;
}

.event-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.event-tag {
    background-color: #f0f2f5;
    color: #666;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
}

.register-btn {
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.register-btn:hover {
    background-color: #0c7ad9;
}

/* 求职干货 */
.tips-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 15px;
}

.tips-item {
    display: flex;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.tips-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tips-item:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.tips-img {
    height: 100px;
    overflow: hidden;
}

.tips-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tips-content {
    padding: 10px;
}

.tips-content h3 {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 5px 0;
    line-height: 1.4;
}

.tips-content p {
    font-size: 12px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* 文章类别样式 */
.tips-category {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(24, 144, 255, 0.9);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* 作者信息样式优化 */
.author {
    display: flex;
    align-items: center;
}

.author-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 5px;
}

/* 点赞按钮样式优化 */
.likes {
    display: flex;
    align-items: center;
    color: #ff4d4f;
}

.likes i {
    margin-right: 3px;
}

/* 点击波纹效果 */
.tips-item {
    position: relative;
    overflow: hidden;
}

.tips-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.7);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.tips-item:active::after {
    animation: ripple 0.4s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.5;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

/* iPhone 15 适配 */
@media screen and (width: 390px) and (height: 844px) {
    .banner-slider {
        height: 200px;
    }
    
    .quick-access {
        margin: 20px 10px;
    }
    
    .access-item {
        min-width: 65px;
        padding: 10px;
    }
    
    .module-header {
        padding: 0 10px;
    }
    
    .article-list, 
    .assessment-cards, 
    .event-list,
    .tips-container {
        padding: 0 10px;
    }
}

/* 小屏设备适配 */
@media (max-width: 390px) {
    .quick-access {
        margin: 15px 10px;
    }
    
    .access-item {
        min-width: 60px;
        padding: 8px;
    }
    
    .article-img {
        flex: 0 0 100px;
    }
    
    .article-content h3 {
        font-size: 14px;
    }
    
    .article-desc {
        font-size: 12px;
    }
    
    .assessment-icon {
        flex: 0 0 40px;
        height: 40px;
    }
    
    .assessment-info h3 {
        font-size: 14px;
    }
    
    .tips-container {
        grid-template-columns: 1fr;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #e0e0e0;
    }
    
    .section-header h2, .module-header h2 {
        color: #e0e0e0;
    }
    
    .more-link, .more {
        color: #aaa;
    }
    
    .article-item, .assessment-card, .event-item, .tips-item, .access-item {
        background-color: #222;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    .article-content h3, .assessment-info h3, .event-info h3, .tips-content h3 {
        color: #e0e0e0;
    }
    
    .article-desc, .article-meta, .assessment-info p, .assessment-meta, .event-location, .tips-content p {
        color: #aaa;
    }
    
    .access-item span {
        color: #ccc;
    }
    
    .access-item:hover {
        background-color: #333;
    }
    
    .event-date {
        background-color: #333;
    }
    
    .month, .day {
        color: #ccc;
    }
    
    .event-tag {
        background-color: #333;
        color: #aaa;
    }
    
    .start-btn, .register-btn {
        background-color: #1668dc;
    }
    
    .start-btn:hover, .register-btn:hover {
        background-color: #1554b9;
    }
}

/* Toast消息样式 */
.toast-message {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 16px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    border-radius: 4px;
    z-index: 1000;
    font-size: 14px;
}

/* 搜索功能相关样式 */
.search-bar {
    position: relative;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 100;
    padding: 10px 0;
    display: none;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-title {
    font-size: 12px;
    color: #999;
    padding: 5px 15px;
    margin-bottom: 5px;
}

.suggestion-item {
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-item:hover {
    background-color: #f5f5f5;
}

/* 下拉刷新相关样式 */
.refresh-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60px;
    margin-top: -60px;
    transition: margin-top 0.3s ease;
    color: #1890ff;
    background-color: transparent;
}

.refresh-indicator.visible {
    margin-top: 0;
}

.refresh-icon {
    font-size: 24px;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.refresh-indicator.refreshing .refresh-icon i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.refresh-text {
    font-size: 12px;
    font-weight: 500;
}

/* 动画效果 */
.animate-in {
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 加载更多按钮样式 */
.load-more-container {
    display: flex;
    justify-content: center;
    margin: 20px 0 10px;
    padding: 0 15px;
}

.load-more-btn {
    background-color: #f5f5f5;
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background-color: #e8e8e8;
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.load-more-btn i {
    margin-left: 6px;
    font-size: 14px;
}

.spin {
    animation: spin 1s linear infinite;
    display: inline-block;
}

/* Toast消息样式 */
.toast-message {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background-color: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.toast-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 点击效果 */
.access-item.clicked .access-icon {
    transform: scale(0.9);
    transition: transform 0.2s ease;
}

.registered {
    background-color: #e6f7ff !important;
    color: #1890ff !important;
    border: 1px solid #91d5ff !important;
}

/* 媒体查询 - 暗黑模式适配 */
@media (prefers-color-scheme: dark) {
    .search-suggestions {
        background-color: #222222;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    }
    
    .suggestion-item:hover {
        background-color: #333333;
    }
    
    .load-more-btn {
        background-color: #333333;
        color: #b0b0b0;
    }
    
    .load-more-btn:hover {
        background-color: #444444;
    }
    
    .registered {
        background-color: rgba(24, 144, 255, 0.2) !important;
        color: #1890ff !important;
        border: 1px solid rgba(24, 144, 255, 0.3) !important;
    }
} 